package com.lingchou.cloud.process.api.enums;

/**
 * @author : bruce.liu
 * @title: : CommentTypeEnum
 * @projectName : flowable
 * @description: 审批意见的类型
 * @date : 2019/11/2412:53
 */
public enum CommentTypeEnum {
    APPROVAL("审批通过"),
    IN_REVIEW("审批中"),
    TURN_DOWN("驳回"),
    NOT_APPROVED("未审批"),
    REVOKE("撤回"),
    TEMPORARY("暂存"),
    CLAIM("签收"),
    DELEGATE("委派"),
    TURN_TO("转办"),
    ADD_BEFORE_SIGN("前加签"),
    ADD_AFTER_SIGN("后加签"),
    SUBMIT("提交"),
    TIME_OUT("超时"),
    TERMINATED("流程终止");

    private String name;//名称

    /**
     * 通过type获取Msg
     *
     * @param type
     * @return
     * @Description:
     */
    public static String getEnumMsgByType(String type) {
        for (CommentTypeEnum e : CommentTypeEnum.values()) {
            if (e.toString().equals(type)) {
                return e.name;
            }
        }
        return "";
    }

    CommentTypeEnum(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}
